<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="copyright" content="(C) Copyright 2005">
<meta name="DC.rights.owner" content="(C) Copyright 2005">
<meta name="DC.Type" content="reference">
<meta name="DC.Title" content="Running Ant">
<meta name="abstract" content="After setting up the Ant environment, you can build the DITA output by running ant command.">
<meta name="description" content="After setting up the Ant environment, you can build the DITA output by running ant command.">
<meta name="DC.Relation" scheme="URI" content="DITA-ant.html">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="runant">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="commonltr.css">
<title>Running Ant</title>
</head>
<body id="runant"><a name="runant"><!-- --></a>


  <h1 class="topictitle1">Running Ant</h1>

  
  
  <div><p>After setting up the Ant environment, you can build the DITA 
    output by running <samp class="codeph">ant</samp> command. </p>

    <div class="example">Here are some samples to explain how to use Ant to build sample 
      output in the DITA directory. <div class="note"><span class="notetitle">Note:</span>  To run the Ant demo properly, you 
      should switch to the <strong>DITA installation directory</strong> under the command 
      prompt. </div>
<ul> <li>You can build all demos in the DITA 
      directory.<p>Input <samp class="codeph">ant all</samp></p>
<p>The building process 
      will create an <strong>/out/</strong> directory and puts the output files in 
      subdirectories that parallel the source directory. </p>
</li>
 <li>You can 
      also rebuild specific part of output of the DITA sample files.<p>You need 
      to remove part of the output first by specifying a 
      "<samp class="codeph">clean</samp>" target, and then rebuild the output. For 
      example: To rebuild FAQ demo, input</p>
<p><samp class="codeph">ant 
      clean.demo.faq</samp></p>
<p><samp class="codeph">ant demo.faq</samp></p>
<div class="note"><span class="notetitle">Note:</span> To 
      find out the complete list of targets you can clean and build, check the 
      <em>name</em> attributes for the target elements within the 
      <em>build.xml</em> file. Or, input <samp class="codeph">ant -projecthelp</samp> for 
      information.</div>
 </li>
 <li>You can also build assigned input to output 
      in a default and easy way. <p>Input <samp class="codeph">ant</samp></p>
<p>Ant will 
      prompt you for the input and output, and you need to input the 
      directories of input files and output with correctly upper or lower case. 
      </p>
</li>
 </ul>
<p>You can reuse the targets provided by the 
      <em>conductor.xml</em> file in builds for your own DITA content by coping 
      the<em> build.xml, conductor.xml, pretargets.xml, ditatargets.xml</em> and 
      <em>catalog-ant.xml </em>files into a new directory and edit the 
      <em>build.xml</em> to specify your DITA files. Refer to <a href="DITA-antscript.html" title="This topic lists detailed Ant tasks and script.">Ant tasks and 
      tweaks</a> for more information of those functions.</p>
<div class="note"><span class="notetitle">Note:</span> To 
      troubleshoot problems in setting up Java, Ant, Saxon, or FOP, you will 
      get better information from the communities for those components rather 
      than the communities for the DITA. Of course, if you find issues relevant 
      to the DITA XSLT scripts (or have ideas for improving them), you are 
      encouraged to engage the DITA community.</div>
 </div>

  </div>

<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="DITA-ant.html" title="Ant is an open tool that uses the DITA processes to make producing DITA output easier.">Building DITA output with Ant</a></div>
</div>
</div>

</body>
</html>